<script >
export default{
    methods:{
        fn(){
            this.$router.push({name:'home',params:{id:'4'}})
        }
    }
}
</script>

<template>  
<RouterLink to="/home/1">首页1</RouterLink>
<br>
<button @click="fn">4</button>
<br>
<RouterLink :to="{name:'home',params:{id:'3'}}">3</RouterLink>
<br>
<RouterLink to="/movie">电影</RouterLink>
<br>
<RouterLink to="/about">关于</RouterLink>

</template>

<style scoped>

</style>
